
function getDays(year,month){

    var d = new Date(year,month,0);
    return d.getDate();
}


var sd = require('silly-datetime');

function dayList(year,month){


    console.log(year,month);
    var days = getDays(year,month);
    month = month - 1;
    // console.log(days);
    var arr = [];
    for(var i=1;i<= days;i++){

        arr.push(sd.format(new Date(year,month,i),'YYYY-MM-DD'));

    }

    return arr;


}

module.exports = {

    dayList: dayList
}



